import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: () => import('@/views/login')
  },
  {
    path: '/member',
    component: () => import('@/views/member')
  },
  {
    path: '/',
    name: 'layout',
    component: () => import('@/views/layout'),
    children: [
      {
        path: '',
        name: 'home',
        component: () => import('@/views/home')
      },
      {
        path: 'menu',
        name: 'menu',
        component: () => import('@/views/menu')
      },
      {
        path: '/list',
        name: 'list',
        component: () => import('../views/details/list/list.vue')
      },
      {
        path: 'shop',
        name: 'shop',
        component: () => import('@/views/shop')
      },
      {
        path: 'my',
        name: 'my',
        component: () => import('@/views/my/index.vue')
      },
      {
        path: '/vip',
        name: 'vip',
        component: () => import('@/views/my/components/vip')
      },
      {
        path: '/evaluate',
        name: 'evaluate',
        component: () => import('@/views/my/components/evaluate')
      },
      {
        path: '/main',
        component: () => import('@/views/main')
      }
    ]
  },
  {
    path: '/Settlement',
    name: 'Settlement',
    component: () => import('@/views/Settlement')
  },
  {
    path: '/addevaluate',
    name: 'addevaluate',
    component: () => import('@/views/my/components/addevaluate')
  },
  {
    path: '/details',
    name: 'details',
    component: () => import('../views/details/index.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
